#include "point.h"
#include "icell.h"
#include "complex_cubic.h"

#include<iostream>

int main(void)
{
	std::cout << "--- MAIN ---" << std::endl;
	
	std::cout << "-- Creation d'un point p1 --" << std::endl;
	Point<2,int> p1;
	std::cout << p1.GetCoordonate(0) << ", " << p1.GetCoordonate(1) << std::endl;
	// std::cout << p1.GetCoordonate(2); --> ABANDON, assert non vérifié.
	p1.SetCoordonate(0, 12);
	std::cout << p1.GetCoordonate(0) << ", " << p1.GetCoordonate(1) << std::endl;
	
	std::cout << "-- Creation d'un point p2 --" << std::endl;
	float fTabCoord[3] = {2.3, 12.6, 5.2};
	Point<3,float>* p2 = new Point<3,float>(fTabCoord);
	std::cout << p2->GetCoordonate(0) << ", " << p2->GetCoordonate(1) << ", " << p2->GetCoordonate(2) << std::endl;
	p2->SetCoordonate(2, 3.8);
	std::cout << p2->GetCoordonate(0) << ", " << p2->GetCoordonate(1) << ", " << p2->GetCoordonate(2) << std::endl;
	
	
	std::cout << std::endl << std::endl;
	std::cout << "=== CREATION D'UNE ICELLULE ===" << std::endl;
	ICell<2, 3, float> ic1;
	ic1.Display();
	
	std::cout << std::endl << std::endl;
	std::cout << "=== CREATION D'UN COMPLEXE CUBIQUE ===" << std::endl;
	ComplexCubic<3, 2, float> cc1;
	std::cout << "IsValid : " << cc1.IsValid() << std::endl;
	std::cout << "FindICell : " << *(cc1.FindICell(&ic1, 2)) << std::endl;
	
	delete p2;
	return 0;
}
